import { combineReducers } from "redux";
import TabbarReducer from "./reducer/TabbarReducer";
import CityReducer from "./reducer/CityReducer";
import CinemaListReducer from "./reducer/CinemaListReducer";
import reduxThunk from "redux-thunk";
import { createStore, applyMiddleware, compose } from 'redux';

const reducer = combineReducers({    //合并Reducer
    TabbarReducer,
    CityReducer,
    CinemaListReducer
})

const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
const store = createStore(reducer, /* preloadedState, */ composeEnhancers(applyMiddleware(reduxThunk)));

export default store;